

//引入 createApp 用于创建应用
import { createApp } from 'vue'
//引入 App 根组件
import App from './App.vue'
const app = createApp(App)
import Hello from './Hello.vue'
app.component('Hello', Hello )


// app.config.globalProperties.x = 99

declare module 'vue' {
  interface ComponentCustomProperties {
    x: number
  }
}


// declare module 'vue' {
//   interface ComponentCustomProperties {
//     $http: typeof axios
//     $translate: (key: string) => string
//   }
// }

app.directive('beauty', (element, {value})=>{
  element.innerText += value
  element.style.color = 'green'
  element.style.backgroundColor = 'yellow'
})


// import emitter from './utils/emitter'

app.mount('#app')
// app.unmount('#app')